load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "mock",
    srcs = ["mock.go"],
    importpath = "github.com/pingcap/tidb/br/pkg/lightning/importer/mock",
    visibility = ["//visibility:public"],
    deps = [
        "//br/pkg/lightning/importer/opts",
        "//br/pkg/lightning/mydump",
        "//br/pkg/storage",
        "//errno",
        "//parser/model",
        "//store/pdtypes",
        "//util/dbterror",
        "//util/filter",
        "@com_github_pingcap_errors//:errors",
        "@com_github_pingcap_kvproto//pkg/metapb",
    ],
)

go_test(
    name = "mock_test",
    timeout = "short",
    srcs = ["mock_test.go"],
    embed = [":mock"],
    flaky = True,
    deps = [
        "//br/pkg/lightning/importer",
        "//parser/model",
        "@com_github_stretchr_testify//require",
    ],
)
